![]() |
WOLF core
WOLF: A Modular Estimation Framework for Robotics
|
#include <core/processor/processor_base.h>
Public Member Functions | |
| void | startCaptureProfiling () |
| void | stopCaptureProfiling () |
| void | startKFProfiling () |
| void | stopKFProfiling () |
| virtual void | printProfiling (std::ostream &stream=std::cout) const |
| ProcessorBase (const std::string &_type, const TypeComposite &_state_types, const YAML::Node &_params) | |
| constructor More... | |
| ~ProcessorBase () override | |
| virtual void | configure (SensorBasePtr _sensor)=0 |
| virtual void | remove () |
| bool | hasChildren () const override |
| const TypeComposite & | getStateTypes () const |
| StateKeys | getStateKeys () const |
| unsigned int | id () const |
| void | keyFrameCallback (FrameBasePtr _keyframe) |
| notify a new keyframe made by another processor More... | |
| void | captureCallback (CaptureBasePtr _capture) |
| notify a new capture More... | |
| SensorBaseConstPtr | getSensor () const |
| SensorBasePtr | getSensor () |
| YAML::Node | getParams () const |
| bool | isMotionProvider () const |
| bool | applyLossFunction () const |
| bool | isVotingActive () const |
| double | getTimeTolerance () const |
| void | setApplyLossFunction (bool _apply_loss_function) |
| void | setVotingActive (bool _voting_active) |
| void | setTimeTolerance (double _time_tolerance) |
| void | setDebugVerboseLevel (const std::string &_debug_verbose_level) |
| std::string | getDebugVerboseLevel () const |
| bool | checkTimeTolerance (const TimeStamp &_ts1, const TimeStamp &_ts2) const |
| bool | checkTimeTolerance (const CaptureBasePtr _cap, const TimeStamp &_ts) const |
| bool | checkTimeTolerance (const FrameBasePtr _frm, const TimeStamp &_ts) const |
| bool | checkTimeTolerance (const FrameBasePtr _frm, const CaptureBasePtr _cap) const |
| virtual void | link (SensorBasePtr) final |
| virtual void | printHeader (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream, std::string _tabs="") const |
| void | print (int depth, bool factored_by, bool metric, bool state_blocks, std::ostream &stream=std::cout, std::string _tabs="") const |
| virtual CheckLog | localCheck (bool _verbose, std::ostream &_stream, std::string _tabs="") const |
| bool | check (CheckLog &_log, bool _verbose, std::ostream &_stream, std::string _tabs="") const |
Public Member Functions inherited from wolf::NodeBase | |
| NodeBase (const std::string &_category, const std::string &_type="Undefined", const std::string &_name="") | |
| virtual | ~NodeBase ()=default |
| unsigned int | nodeId () const |
| std::string | getCategory () const |
| std::string | getType () const |
| std::string | getName () const |
| bool | isRemoving () const |
| virtual bool | hasChildren () const =0 |
| void | setType (const std::string &_type) |
| void | setName (const std::string &_name) |
| ProblemConstPtr | getProblem () const |
| ProblemPtr | getProblem () |
Protected Member Functions | |
| virtual void | processCapture (CaptureBasePtr)=0 |
| process an incoming capture More... | |
| virtual void | processKeyFrame (FrameBasePtr _keyframe_ptr)=0 |
| process an incoming key-frame More... | |
| virtual bool | triggerInCapture (CaptureBasePtr) const =0 |
| trigger in capture More... | |
| virtual bool | triggerInKeyFrame (FrameBasePtr) const =0 |
| trigger in key-frame More... | |
| virtual bool | storeKeyFrame (FrameBasePtr)=0 |
| store key frame More... | |
| virtual bool | storeCapture (CaptureBasePtr)=0 |
| store capture More... | |
| virtual bool | voteForKeyFrame () const =0 |
| Vote for KeyFrame generation. More... | |
| virtual bool | permittedKeyFrame () const final |
| void | setProblem (ProblemPtr) override |
| void | addTypes (const TypeComposite &) |
| add state types More... | |
| virtual void | setProblem (ProblemPtr _prob_ptr) |
Protected Attributes | |
| unsigned int | processor_id_ |
| YAML::Node | params_ |
| BufferFrame | buffer_frame_ |
| BufferCapture | buffer_capture_ |
| std::string | debug_verbose_level_ |
Protected Attributes inherited from wolf::NodeBase | |
| ProblemWPtr | problem_ptr_ |
| unsigned int | node_id_ |
| Node id. It is unique over the whole Wolf Tree. More... | |
| std::string | node_category_ |
| Text label identifying the category of node ("SENSOR", "FEATURE", etc) More... | |
| std::string | node_type_ |
| Text label identifying the type or subcategory of node ("Pin Hole", "Point 2d", etc) More... | |
| std::string | node_name_ |
| bool | is_removing_ |
| A flag for safely removing nodes from the Wolf tree. See remove(). More... | |
| wolf::ProcessorBase::ProcessorBase | ( | const std::string & | _type, |
| const TypeComposite & | _state_types, | ||
| const YAML::Node & | _params | ||
| ) |
constructor
| _type | TO BE HARDCODED IN THE DERIVED CLASS CONSTRUCTOR: type name |
| _state_types | TO BE HARDCODED IN THE DERIVED CLASS CONSTRUCTOR: The composite of state types of the frames created or used by this processor |
| _params | params yaml node |
|
override |
|
protected |
add state types
This function adds the provided state types to the processor and problem (if set)
|
inline |
| void wolf::ProcessorBase::captureCallback | ( | CaptureBasePtr | _capture | ) |
notify a new capture
It stores the new capture in buffer_capture_ and calls triggerInCapture()
| bool wolf::ProcessorBase::check | ( | CheckLog & | _log, |
| bool | _verbose, | ||
| std::ostream & | _stream, | ||
| std::string | _tabs = "" |
||
| ) | const |
| bool wolf::ProcessorBase::checkTimeTolerance | ( | const CaptureBasePtr | _cap, |
| const TimeStamp & | _ts | ||
| ) | const |
| bool wolf::ProcessorBase::checkTimeTolerance | ( | const FrameBasePtr | _frm, |
| const CaptureBasePtr | _cap | ||
| ) | const |
| bool wolf::ProcessorBase::checkTimeTolerance | ( | const FrameBasePtr | _frm, |
| const TimeStamp & | _ts | ||
| ) | const |
| bool wolf::ProcessorBase::checkTimeTolerance | ( | const TimeStamp & | _ts1, |
| const TimeStamp & | _ts2 | ||
| ) | const |
|
pure virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements wolf::NodeBase.
|
inline |
|
inline |
|
inline |
| void wolf::ProcessorBase::keyFrameCallback | ( | FrameBasePtr | _keyframe | ) |
notify a new keyframe made by another processor
It stores the new KF in buffer_frame_ and calls triggerInKF()
|
finalvirtual |
|
virtual |
|
finalprotectedvirtual |
| void wolf::ProcessorBase::print | ( | int | depth, |
| bool | factored_by, | ||
| bool | metric, | ||
| bool | state_blocks, | ||
| std::ostream & | stream = std::cout, |
||
| std::string | _tabs = "" |
||
| ) | const |
|
virtual |
Reimplemented in wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
virtual |
Reimplemented in wolf::ProcessorTracker.
|
protectedpure virtual |
process an incoming capture
Each derived processor should implement this function. It will be called if:
Implemented in wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorLoopClosure, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
protectedpure virtual |
process an incoming key-frame
Each derived processor should implement this function. It will be called if:
Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
virtual |
|
inline |
|
inline |
|
overrideprotectedvirtual |
Reimplemented from wolf::NodeBase.
|
inline |
|
inline |
|
inline |
|
inline |
| void wolf::ProcessorBase::stopCaptureProfiling | ( | ) |
| void wolf::ProcessorBase::stopKFProfiling | ( | ) |
|
protectedpure virtual |
store capture
Returns true if the capture should be stored
Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
protectedpure virtual |
store key frame
Returns true if the key frame should be stored
Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
protectedpure virtual |
trigger in capture
Returns true if processCapture() should be called after the provided capture arrived.
Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
protectedpure virtual |
trigger in key-frame
Returns true if processKeyFrame() should be called after the provided KF arrived.
Implemented in wolf::ProcessorLoopClosure, wolf::ProcessorPose< DIM >, wolf::ProcessorFixedWingModel, wolf::ProcessorMotion, and wolf::ProcessorTracker.
|
protectedpure virtual |
Vote for KeyFrame generation.
If a KeyFrame criterion is validated, this function returns true, meaning that it wants to create a KeyFrame at the last Capture.
WARNING! This function only votes! It does not create KeyFrames!
Implemented in wolf::ProcessorFixedWingModel, wolf::ProcessorLandmarkExternal, wolf::ProcessorLoopClosure, wolf::ProcessorMotion, wolf::ProcessorOdom2d, wolf::ProcessorOdom3d, wolf::ProcessorPose< DIM >, wolf::ProcessorTracker, wolf::ProcessorTrackerFeature, and wolf::ProcessorTrackerLandmark.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |